/*
 * p2146.cpp
 *
 *  Created on: 2013-3-14
 *      Author: zy
 */
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

int dp[2][35][510],p[35];

int main()
{
	int T,N,M;
	scanf("%d",&T);
	while(T--)
	{
		scanf("%d%d",&N,&M);
		for(int i=1;i<=N;i++)
			scanf("%d",&p[i]);
		sort(p+1,p+N+1);
		memset(dp,0,sizeof(dp));
		for(int i=0;i<=M;i++)dp[0][0][i]=dp[1][0][i]=1;
		for(int i=1;i<=N;i++)
			for(int j=1;j<=i;j++)
				for(int k=0;k<=M;k++)
				{
					dp[i%2][j][k]=dp[(i-1)%2][j][k];
					if(k-p[i]>=0)dp[i%2][j][k]+=dp[(i-1)%2][j-1][k-p[i]];
				}
		int K=0;
		for(int i=N;i>=1;i--)
			if(dp[N%2][i][M]>0){K=i;break;}
		if(K>0)printf("You have %d selection(s) to buy with %d kind(s) of souvenirs.\n",dp[N%2][K][M],K);
		else printf("Sorry, you can't buy anything.\n");
	}
}
